home *** CD-ROM | disk | FTP | other *** search
- Path: alfa.ist.utl.pt!l41471
- From: Nuno Silva <l41471@alfa.ist.utl.pt>
- Newsgroups: comp.lang.c
- Subject: Variant Records in C ... Is there a way ?
- Date: Tue, 19 Mar 1996 17:12:18 +0000
- Organization: Instituto Superior Tecnico
- Message-ID: <Pine.OSF.3.91.960319170252.9783B-100000@alfa.ist.utl.pt>
- NNTP-Posting-Host: alfa.ist.utl.pt
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
-
-
- I would like to know if there is any way of implementing in C a
- structure that if a determined argument (or info or depending on the
- value of a particular field of a structure) could ignore or acknoledge a
- certain field of the structure ...
-
- Example :
- struct bla {
- int field1;
- int field2;
- int field3;
- }
- And having a struct looking like this one, consider field3 if
- field1=1, or ignore it (by not placing it in the data structure thus
- saving memory ...)
-
- Any help would be highly apreciated ... (even if it's just to
- say that there isn't a way ... it would make me stop searching for it ;))
-
-
- Regards from :
- Nuno Miguel Almeida Silva
- l41471@alfa.ist.utl.pt
- http://alfa.ist.utl.pt/~l41471
- Instituto Superior Tecnico - Lisbon - Portugal
- There's a major genocide going on in East Timor
-